import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store/index";
// import axios from './http'

import ElementUI from "element-ui";
// import 'element-ui/lib/theme-chalk/index.css'
// import './assets/style/theme/index.css'
import "./common.scss";
import 'element-ui/lib/theme-chalk/index.css'

import moment from "moment";
// import echarts from "echarts";
import * as echarts from 'echarts';
import VueClipboard from 'vue-clipboard2'
import  './premission' // directive

import VueQuillEditor from "vue-quill-editor";
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
import Index from '@/components/Index.js'
import VueAMap from 'vue-amap';
// import "./assets/iconfont.css";
// import VueAMap from "vue-amap";
Vue.prototype.$echarts = echarts;
Vue.prototype.$moment = moment;
Vue.prototype.$baseUrl = "https://backstage.ztkuaichong.com:3001"
// Vue.prototype.$baseUrl = "https://192.168.0.88:3001"
// Vue.use(VueAMap);
Vue.config.productionTip = false;
// import BaiduMap from 'vue-baidu-map'

//百度地图
// Vue.use(BaiduMap, {
//   // ak 是在百度地图开发者平台申请的密钥 详见 http://lbsyun.baidu.com/api/key */
//   ak: 'NLxeEkKxzplHgZnBgTuulsMQB3UdC1qk'
// })
// //高德地图
Vue.use(VueAMap);

VueAMap.initAMapApiLoader({
  key: '6dc2d3a5a7cda44efd7ca06cf279a97e',
  plugin: ["AMap.Autocomplete", "AMap.Geocoder", "AMap.Geolocation", 'AMap.PlaceSearch','AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType',],
  // 默认高德 sdk 版本为 1.4.4
  v: '1.4.4',
  uiVersion: '1.0' // 版本号
});
window._AMapSecurityConfig = { securityJsCode: '410c4116a8b96e2c8a196da5d05468bf'}
//全局时间格式化过滤
Vue.filter("moment", function(value, formatString) {
  if (!value) return "--";
  formatString = formatString || "YYYY-MM-DD HH:mm:ss";
  return moment(value).format("YYYY-MM-DD HH:mm");
});
Vue.use(VueClipboard)
Vue.use(ElementUI);
Vue.use(VueQuillEditor);
Vue.use(Index)


new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");
